/**
 * 
 */
package com.itinsys.enma.manager.impl;

import org.springframework.beans.factory.annotation.Autowired;

import com.itinsys.enma.domain.response.Response;
import com.itinsys.enma.manager.ResponseManager;
import com.itinsys.enma.util.InternalMessageService;

/**
 * @author pferraz
 *
 */
public class ResponseManagerImpl implements ResponseManager {

	@Autowired
	private InternalMessageService messageService;
	/**
	 * 
	 */
	public ResponseManagerImpl() {
		// TODO Auto-generated constructor stub
	}

	/* (non-Javadoc)
	 * @see com.itinsys.enma.service.ResponseService#prepareResponse(com.itinsys.enma.domain.response.Response)
	 */
	public void prepareResponse(Response response,int responseCode) {
		// TODO Auto-generated method stub
		response.setResponseCode(responseCode);
		response.setMessage(messageService.getMessage(response.getMessagesCode().get(response.getResponseCode())));
	}

}
